// mircoApp/competitionApply/gameUser/gameUser.js
const app = getApp();
const skinBehavior = require("../../../utils/themeSkin/skinBehavior");
Page({
  behaviors: [skinBehavior],
  /**
   * 页面的初始数据
   */
  data: {
    navList:[
      {
        name:'赛事活动',
        iconfont:'icon-saishihuodong',
        url: '/mircoApp/competitionApply/competitionIndex/competitionIndex'
      },
      {
        name:'报名记录',
        iconfont:'icon-baomingjilu',
        url:'/mircoApp/competitionApply/applyOrder/applyOrder',
      },
      {
        name:'我的成绩',
        iconfont:'icon-wodechengji',
        url:'/mircoApp/competitionApply/myResult/myResult'
      },
      {
        name:'学员管理',
        iconfont:'icon-xueyuanguanli',
        url:'/mircoApp/competitionApply/studentManage/studentManage'
      }
    ],
    userInfo:{}
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    this.getInfo();
  },
  getInfo() { //会员信息
    let urlStr = app.getNetAddresss("plugin.event-registration.api.base-info.get-data");
    app._postNetWork({
      url: urlStr,
      data: {basic_info:1},
      success: (resdata) => {
        var res = resdata.data;
        let data = res.data;
        if (res.result == 1) {
          this.setData({
            userInfo:data
          })
        }
      },
      fail: function (res) {
        console.log(res);
      },
    });
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})